<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>权限管理</title>
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <link rel="stylesheet" href="../css/bootstrap.css">
</head>
<body bgcolor="#f5f5f5">
<script src="../js/jquery-3.4.1.min.js"></script>
<script src="../js/popper.min.js"></script>
<script src="../js/bootstrap-table1.15.3.js"></script>
<script src="../js/bootstrap-table-zh-CN.min.js"></script>
<script src="../js/bootstrap-min-4.3.1.js"></script>
<script src="../js/pintuer.js"></script>
<script src="../js/initMain.js"></script>
<script>
    function initTable(){
        $("#tableInfo").bootstrapTable({
            method:"post",
            contentType:"application/json",
            url:"/sysAuthorization/queryAllSysAuthorizations.action",
            //设置交替行样式
            striped:true,
            //初始显示页数
            pageNum:1,
            //是否显示分页
            pagination:true,
            //设置是服务端分页还是客户端分页
            sidePagination:"server",
            //页大小
            pageSize:10,
            //分页列表
            pageList: [5,6,10],
            //上传到服务器的参数
            queryParams:function (data) {
                return{
                    //计算页号，当前号
                    pageNum:(data.offset/data.limit)+1,
                    //计算页大小
                    pageSize: data.limit,
                }
            },
            columns:[

                {title:"编号",field:"auId",align:"center"},
                {title:"权限名",field:"auName",align:"center"},
                {title:"权限路径",field:"auCode",align:"center"},
                {title:"状态",field:"status",align:"center",formatter:function (value,row,index) {
                        if(value==1||value=="1"){
                            return "启用";
                        }else if(value==0||value=="0"){
                            return "禁用";
                        }
                    }},

            ]
                // alert(allTableData.length);

        })
    }
    $(function () {
        initTable();
    })
</script>
<input type="hidden" name="pageSize" value="5">
<input type="hidden" name="pageNum" value="1">
<table id="tableInfo" style="text-align: center;" class="table table-bordered table-hover table-striped table-condensed">

</table>
</body>
</html>